package com.mxy.myapplication2.java;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

import com.mxy.myapplication2.R;

/**
 * Created by Administrator on 2017/11/8.
 */

public class ThirdActivity extends AppCompatActivity implements View.OnClickListener {

  @Override
  protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    System.out.println("ThirdActivity  getTaskId:"+getTaskId());
    setContentView(R.layout.activity_third);
    findViewById(R.id.button).setOnClickListener(this);
  }


  @Override
  protected void onNewIntent(Intent intent) {
    super.onNewIntent(intent);
    System.out.println("ThirdActivity_onNewIntent");
  }

  @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    System.out.println("ThirdActivity_onActivityResult");
  }

  @Override
  public void onClick(View v) {
    startActivityForResult(new Intent(this, SecondActivity.class), 1);
  }

  @Override
  protected void onDestroy() {
    super.onDestroy();
    System.out.println("ThirdActivity_销毁");
  }
}
